/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package util;

import java.io.File;

/**
 *
 * @author danang
 */
public class DirectoryCreator {
    // Mengecek dan membuat directory jika belum ada
    public static boolean createOrCheckIfExistDir(String path) {
        File file = new File(path);
        boolean exist = file.exists();
        if (!exist) {
            exist = file.mkdirs();
        }
        return exist;
    }
    
    
    // check apakah file/folder exist
    public static boolean isFileExist(String path) {
        File file = new File(path);
        return file.exists();
    }
}
